<style type="text/css">
    .sm-st {
        background:#fff;
        padding:20px;
        -webkit-border-radius:3px;
        -moz-border-radius:3px;
        border-radius:3px;
        margin-bottom:20px;
        -webkit-box-shadow: 0 1px 0px rgba(0,0,0,0.05);
        box-shadow: 0 1px 0px rgba(0,0,0,0.05);
    }
    .sm-st-icon {
        width:60px;
        height:60px;
        display:inline-block;
        line-height:60px;
        text-align:center;
        font-size:30px;
        background:#eee;
        -webkit-border-radius:5px;
        -moz-border-radius:5px;
        border-radius:5px;
        float:left;
        margin-right:10px;
        color:#fff;
    }
    .sm-st-info {
        font-size:12px;
        padding-top:2px;
    }
    .sm-st-info span {
        display:block;
        font-size:24px;
        font-weight:600;
    }
    .orange {
        background:#fa8564 !important;
    }
    .tar {
        background:#45cf95 !important;
    }
    .sm-st .green {
        background:#86ba41 !important;
    }
    .pink {
        background:#AC75F0 !important;
    }
    .yellow-b {
        background: #fdd752 !important;
    }
    .stat-elem {

        background-color: #fff;
        padding: 18px;
        border-radius: 40px;

    }

    .stat-info {
        text-align: center;
        background-color:#fff;
        border-radius: 5px;
        margin-top: -5px;
        padding: 8px;
        -webkit-box-shadow: 0 1px 0px rgba(0,0,0,0.05);
        box-shadow: 0 1px 0px rgba(0,0,0,0.05);
        font-style: italic;
    }

    .stat-icon {
        text-align: center;
        margin-bottom: 5px;
    }

    .st-red {
        background-color: #F05050;
    }
    .st-green {
        background-color: #27C24C;
    }
    .st-violet {
        background-color: #7266ba;
    }
    .st-blue {
        background-color: #23b7e5;
    }

    .stats .stat-icon {
        color: #28bb9c;
        display: inline-block;
        font-size: 26px;
        text-align: center;
        vertical-align: middle;
        width: 50px;
        float:left;
    }

    .stat {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
        margin-right: 10px; }
    .stat .value {
        font-size: 20px;
        line-height: 24px;
        overflow: hidden;
        text-overflow: ellipsis;
        font-weight: 500; }
    .stat .name {
        overflow: hidden;
        text-overflow: ellipsis; }
    .stat.lg .value {
        font-size: 26px;
        line-height: 28px; }
    .stat.lg .name {
        font-size: 16px; }
    .stat-col .progress {height:2px;}
    .stat-col .progress-bar {line-height:2px;height:2px;}

    .item {
        padding:30px 0;
    }
</style>
<div class="panel panel-default panel-intro">
    <div class="panel-heading">

        <ul class="nav nav-tabs">
            <li class="active"><a href="#one" data-toggle="tab">{:__('Dashboard')}</a></li>
            <!-- <li><a href="#two" data-toggle="tab">{:__('Custom')}</a></li> -->
        </ul>
    </div>
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">

                <div class="box-header">
                    <h3 class="box-title">{:__('参与活动人数统计')}</h3>
                    <!-- <div class="box-tools pull-right">
                        <a href="./guide/guide/index?ref=addtabs" target="_blank" class="btn btn-box-tool">{:__('More')}</a>
                    </div> -->
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-6">
                        <div class="sm-st clearfix">
                            <!-- <span class="sm-st-icon st-red"><i class="fa fa-line-chart"></i></span> -->
                            <div class="sm-st-info">
                                <span>{$todayuser}</span>
                                {:__('Today user')}
                            </div>
                            <span class="progress-description">
                                当天申请参加活动用户
                            </span>
                        </div>
                    </div>
                    <div class="col-sm-3 col-xs-6">
                        <div class="sm-st clearfix">
                            <!-- <span class="sm-st-icon st-violet"><i class="fa fa-users"></i></span> -->
                            <div class="sm-st-info">
                                <span>{$totaluser}</span>
                                {:__('Total user')}
                            </div>
                            <span class="progress-description">
                                申请参加活动总用户数
                            </span>
                        </div>
                    </div>
                    <div class="col-sm-3 col-xs-6">
                        <div class="sm-st clearfix">
                            <!-- <span class="sm-st-icon st-green"><i class="fa fa-user"></i></span> -->
                            <div class="sm-st-info">
                                <span>{$activateuser}</span>
                                {:__('Activate user')}
                            </div>
                            <span class="progress-description">
                                参加活动且激活用户总数
                            </span>
                        </div>
                    </div>

                    <div class="col-sm-3 col-xs-6">
                        <div class="sm-st clearfix">
                            <!-- <span class="sm-st-icon st-green"><i class="fa fa-user-times"></i></span> -->
                            <div class="sm-st-info">
                                <span>{$notactivateuser}</span>
                                {:__('Not activate user')}
                            </div>
                            <span class="progress-description">
                                申请活动为激活用户总数
                            </span>
                        </div>
                    </div>

                    <!-- <div class="col-sm-3 col-xs-6">
                        <div class="sm-st clearfix">
                            <span class="sm-st-icon st-blue"><i class="fa fa-user-plus"></i></span>
                            <div class="sm-st-info">
                                <span>{$parent_group}</span>
                                {:__('Parent Group')}
                            </div>
                            <span class="progress-description">
                                活动共邀请多少人参加
                            </span>
                        </div>
                    </div> -->
                </div>

                <div class="box-header" style="margin-top:15px;">
                    <h3 class="box-title">{:__('数据趋势图（近7天）')}</h3>
                </div>

                <div class="row" >
                    <div class="col-lg-8">
                        <div id="echart" style="height: 200px; width: 100%; -webkit-tap-highlight-color: transparent; user-select: none; position: relative; background: rgba(252, 252, 252, 0);" _echarts_instance_="ec_1531480193328"></div>
                    </div>

                </div>


                <div class="box-header" style="margin-top:15px;">
                    <h3 class="box-title">{:__('Activity Data List')}</h3>
                    <!-- <div class="box-tools pull-right">
                        <a href="./guide/guide/index?ref=addtabs" target="_blank" class="btn btn-box-tool">{:__('More')}</a>
                    </div> -->
                </div>

                <div class="row">
                    {volist name="activityData" id="vo"  }
                        <div class="col-xs-12 col-md-12">
                            <div class="panel {$vo['bgcolor']}">
                                <div class="panel-body">
                                    <div class="panel-title">
                                        <span class="label label-success pull-right">{:__('实时数据')}</span>
                                        <h5>{$vo['title']} 活动数据</h5>
                                    </div>
                                    <div class="panel-content">
                                        <!-- <h1 class="no-margins">1234</h1>
                                        <div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 1234</div>
                                        <small>{:__('Category count tips')}</small>

                                        <h1 class="no-margins">1234</h1>
                                        <div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 1234</div>
                                        <small>{:__('Category count tips')}</small> -->

                                        <div class="col-sm-2 border-right">
                                            <div class="description-block">
                                                <h5 class="description-header">{$vo['totaluser']}</h5>
                                                <span class="description-text">参与总用户</span>
                                            </div>
                                        </div>

                                        <div class="col-sm-2 border-right">
                                            <div class="description-block">
                                                <h5 class="description-header">{$vo['activateuser']}</h5>
                                                <span class="description-text">已激活用户(入群)</span>
                                            </div>
                                        </div>

                                        <div class="col-sm-2 border-right">
                                            <div class="description-block">
                                                <h5 class="description-header">{$vo['notactivateuser']}</h5>
                                                <span class="description-text">未激活用户</span>
                                            </div>
                                        </div>
                                        <div class="col-sm-2 border-right">
                                            <div class="description-block">
                                                <h5 class="description-header">{$vo['total_rate']} {$vo['rate_unit']}</h5>
                                                <span class="description-text">消耗奖励</span>
                                            </div>
                                        </div>
                                        <div class="col-sm-2 border-right">
                                            <div class="description-block">
                                                <h5 class="description-header">{$vo['activate_rate']} {$vo['rate_unit']}</h5>
                                                <span class="description-text">入群激活奖励</span>
                                            </div>
                                        </div>
                                        <div class="col-sm-2 border-right">
                                            <div class="description-block">
                                                <h5 class="description-header">{$vo['invitation_rate']} {$vo['rate_unit']}</h5>
                                                <span class="description-text">邀请奖励</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    {/volist}

                    <!-- bg-aqua-gradient bg-purple-gradient  bg-green-gradient-->



                    <!-- <div class="col-xs-6 col-md-3">
                        <div class="panel bg-aqua-gradient">
                            <div class="panel-body">
                                <div class="ibox-title">
                                    <span class="label label-info pull-right">{:__('Real time')}</span>
                                    <h5>{:__('Attachment count')}</h5>
                                </div>
                                <div class="ibox-content">
                                    <h1 class="no-margins">1043</h1>
                                    <div class="stat-percent font-bold text-gray"><i class="fa fa-modx"></i> 2592</div>
                                    <small>{:__('Attachment count tips')}</small>
                                </div>
                            </div>
                        </div>
                    </div> -->
                </div>


                <div class="box-header">
                    <h3 class="box-title">{:__('群数据')}</h3>
                    <!-- <div class="box-tools pull-right">
                        <a href="./guide/guide/index?ref=addtabs" target="_blank" class="btn btn-box-tool">{:__('More')}</a>
                    </div> -->
                </div>

                <div class="row" style="margin-top:15px;">
                    {volist name="chatData" id="vo"  }
                        <div class="col-xs-12 col-md-12">
                            <div class="panel {$vo['bgcolor']}">
                                <div class="panel-body">
                                    <div class="panel-title">
                                        <span class="label label-success pull-right">{:__('TokenMan统计')}</span>
                                        <h5>{$vo['title']} 用户数据</h5>
                                    </div>
                                    <div class="panel-content">
                                        <!-- <h1 class="no-margins">1234</h1>
                                        <div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 1234</div>
                                        <small>{:__('Category count tips')}</small>

                                        <h1 class="no-margins">1234</h1>
                                        <div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 1234</div>
                                        <small>{:__('Category count tips')}</small> -->

                                        <div class="col-sm-2 border-right">
                                            <div class="description-block">
                                                <h5 class="description-header">{$vo['todayuser']}</h5>
                                                <span class="description-text">今日新增用户</span>
                                            </div>
                                        </div>

                                        <div class="col-sm-2 border-right">
                                            <div class="description-block">
                                                <h5 class="description-header">{$vo['group_user_count']}</h5>
                                                <span class="description-text">群用户总人数</span>
                                            </div>
                                        </div>

                                        <div class="col-sm-2 border-right">
                                            <div class="description-block">
                                                <h5 class="description-header">{$vo['extuser']}</h5>
                                                <span class="description-text">退群用户数据</span>
                                            </div>
                                        </div>
                                        <div class="col-sm-2 border-right">
                                            <div class="description-block">
                                                <h5 class="description-header">{$vo['blankuser']}</h5>
                                                <span class="description-text">封禁用户数据</span>
                                            </div>
                                        </div>
                                        <div class="col-sm-2 border-right">
                                            <div class="description-block">
                                                <h5 class="description-header">{$vo['blanknews']}条</h5>
                                                <span class="description-text">屏蔽群用户消息数据</span>
                                            </div>
                                        </div>
                                        <!-- <div class="col-sm-2 border-right">
                                            <div class="description-block">
                                                <h5 class="description-header">123123 条</h5>
                                                <span class="description-text">群消息总数</span>
                                            </div>
                                        </div> -->
                                    </div>
                                </div>
                            </div>
                        </div>
                    {/volist}
                </div>

                <div class="row">
                    <div class="col-lg-4">
                        <div class="box box-danger">
                            <div class="box-header">
                                <h3 class="box-title">{:__('Novice guidance')}</h3>
                                <div class="box-tools pull-right">
                                    <a href="./guide/guide/index?ref=addtabs" target="_blank" class="btn btn-box-tool">{:__('More')}</a>
                                </div>
                            </div>
                            <div class="box-body" id="news-list">

                            </div>
                        </div>
                    </div>
                    <!-- <div class="col-lg-4">
                        <div class="box box-success">
                            <div class="box-header">
                                <h3 class="box-title">{:__('Recent discussion')}</h3>
                                <div class="box-tools pull-right">
                                    <a href="http://forum.fastadmin.net" class="btn btn-box-tool">{:__('More')}</a>
                                </div>
                            </div>
                            <div class="box-body" id="discussion-list">

                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4">
                        <div class="box box-info">
                            <div class="box-header"><h3 class="box-title">{:__('Server info')}</h3></div>
                            <div class="box-body">
                                <table class="table table-striped">
                                    <tbody>
                                        <tr>
                                            <td width="120px">{:__('PHP version')}</td>
                                            <td>{$Think.const.PHP_VERSION}</td>
                                        </tr>
                                        <tr>
                                            <td width="120px">{:__('TokenMan version')}</td>
                                            <td>{$Think.config.fastadmin.version}</td>
                                        </tr>
                                        <tr>
                                            <td width="120px">{:__('Sapi name')}</td>
                                            <td>{:php_sapi_name()}</td>
                                        </tr>
                                        <tr>
                                            <td width="120px">{:__('Debug mode')}</td>
                                            <td>{$Think.config.app_debug?__('Yes'):__('No')}</td>
                                        </tr>
                                        <tr>
                                            <td width="120px">{:__('Software')}</td>
                                            <td>{$Think.server.SERVER_SOFTWARE}</td>
                                        </tr>
                                        <tr>
                                            <td width="120px">{:__('Upload mode')}</td>
                                            <td>{$uploadmode}</td>
                                        </tr>
                                        <tr>
                                            <td width="120px">{:__('Upload url')}</td>
                                            <td>{$config.upload.uploadurl}</td>
                                        </tr>
                                        <tr>
                                            <td width="120px">{:__('Timezone')}</td>
                                            <td>{:date_default_timezone_get()}</td>
                                        </tr>
                                        <tr>
                                            <td width="120px">{:__('Language')}</td>
                                            <td>{$config.language}</td>
                                        </tr>
                                    </tbody></table>
                            </div>
                        </div>
                    </div> -->
                </div>
            </div>
            <div class="tab-pane fade" id="two">
                <div class="row">
                    <div class="col-xs-12">
                        {:__('Custom zone')}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script id="newstpl" type="text/html">
    <ul class="nav nav-stacked">
        <%for(var i=0;i < news.length;i++){%>
        <%var item=news[i];%>
        <li>
            <a href="<%=item.url%>">
                {if condition="isset($_COOKIE['think_var']) && $_COOKIE['think_var'] eq 'en'"}
                    <span class="text"><%=item.en_title%></span>
                {else/}
                    <span class="text"><%=item.title%></span>
                {/if}
            </a>
        </li>
        <%}%>

    </ul>
</script>
<script id="discussiontpl" type="text/html">
    <ul class="products-list product-list-in-box">
        <%for(var i=0;i < news.length;i++){%>
        <%var item=news[i];%>
        <li class="item">
            <div class="">
                <a href="<%=item.url%>" class="product-title"><%=item.title%>
                    <span class="label label-warning pull-right"><%=item.comments_count%></span></a>
                <span class="product-description">
                    <%=item.last_time%>
                </span>
            </div>
        </li>
        <%}%>
    </ul>
</script>
<script>
    var Orderdata = {
    column: {:json_encode(array_keys($paylist))},
            paydata: {:json_encode(array_values($paylist))},
            createdata: {:json_encode(array_values($createlist))},
    };
</script>
